package com.gcu.drivingschool.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 *分数实体
 * @author zzr
 * @since 2024-06-24
 */
@Schema(description = "分数实体")
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("score")
public class Score{

    /**
     * 主键
     */
    @Schema(description = "主键")
    @TableId
    private Integer id;

    /**
     * 学员id
     */
    @Schema(description = "学员id")
    @NotNull
    private Integer studentId;

    /**
     * 学员姓名
     */
    @Schema(hidden = true)
    @TableField(exist = false)
    private String studentName;

    /**
     * 考试日期
     */
    @Schema(description = "考试时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8")
    private LocalDate examTime;

    /**
     * 考试科目
     */
    @Schema(description = "考试科目")
    @NotBlank
    private String subject;

    /**
     * 考试分数
     */
    @Schema(description = "考试分数")
    @NotNull
    private BigDecimal score;


    /**
     * 考试状态（合格,不合格）
     */
    @Schema(description = "考试状态（合格,不合格）")
    private String status;

}
